package com.itheima.demo5;

import java.io.*;

public class IODemo9 {
    public static void main(String[] args) throws IOException {

        //创建字符缓冲区

        BufferedReader br = new BufferedReader(new FileReader("a.txt"));
        BufferedWriter bw = new BufferedWriter(new FileWriter("copy2.txt"));

        String st= null;
        while ((st = br.readLine())!= null){
            bw.write(st);
        }

        br.close();
    }
}
